Characterizing and Removing Branch Mispredictions
نویسنده
چکیده
Control-flow mispredictions are a profound impediment to processor performance, because each misprediction introduces a pipeline bubble of many cycles’ duration. For example, the minimum bubble in the recently released Alpha 21264 is at least seven cycles, and often as much as twenty cycles. With such long penalties, even small misprediction rates harm performance substantially. Although a huge number of techniques have been proposed to combat this problem, most have focused on only one type of misprediction: conflicts in the predictor’s state tables. This thesis describes a taxonomy of misprediction types and presents data showing that several other types of mispredictions are just as important as conflicts. Techniques to attack three of these misprediction types are then described. Alloying makes both local and global history available in a single branch predictor structure, providing robust performance compared against both conventional two-level predictors and against hybrid predictors. Speculative update with fixup ensures that the predictor’s state remains up-to-date, while protecting the state against corruption from mispredicted branches. Finally, multipath execution simultaneously executes both sides of a branch, eliminating mispredictions for those branches that are otherwise difficult to predict. This work also explores tradeoffs among branch prediction, instruction window size, data cache size, and instruction cache size, and shows that branch prediction is the most powerful lever on processor performance. This thesis makes one further contribution, demonstrating that long benchmarks can be simulated efficiently by simulating only a small but carefully chosen 50 million instruction segment of the program’s overall execution. This technique avoids un-
منابع مشابه
Characterizing the Mispredicted Branches
Studies of branch prediction have tended to emphasize aggregate measurement of prediction performance. Instead, we have taken the approach that there are likely to be a small number of branch addresses (“sites”) in the program causing the majority of all mispredictions. Using a graphical tool we developed for analyzing program traces on-the-fly, we present three interesting results, all based o...
متن کاملTradeoffs Between Branch Mispredictions and Comparisons for Sorting Algorithms
Branch mispredictions is an important factor affecting the running time in practice. In this paper we consider tradeoffs between the number of branch mispredictions and the number of comparisons for sorting algorithms in the comparison model. We prove that a sorting algorithm using O(dn log n) comparisons performs Ω(n log d n) branch mispredictions. We show that Multiway MergeSort achieves this...
متن کاملAlloyed Global and Local Branch History: A Robust Solution to Wrong-History Mispredictions
The need for accurate conditional-branch prediction is well known: mispredictions waste large numbers of cycles, inhibit out-of-order execution, and waste power on mis-speculated computation. Prior work on branch-predictor organization has focused mainly on how to reduce conflicts in the branch-predictor structures, while relatively little work has explored other causes of mispredictions. Some ...
متن کاملBranch Mispredictions Don't Affect Mergesort
In quicksort, due to branch mispredictions, a skewed pivotselection strategy can lead to a better performance than the exactmedian pivot-selection strategy, even if the exact median is given for free. In this paper we investigate the effect of branch mispredictions on the behaviour of mergesort. By decoupling element comparisons from branches, we can avoid most negative effects caused by branch...
متن کاملOptimizing Interpreters for Processors with Branch Target Buffers
Interpreters designed for efficiency execute a huge number of indirect branches and can spend more than half of the execution time in indirect branch mispredictions. Branch target buffers are the best widely available form of indirect branch prediction; they produce 50%–100% mispredictions for existing interpreters. In this paper we investigate three methods for improving the prediction accurac...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1999